//1.导入 vue-router 包
import VueRouter from 'vue-router';

import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopCarContainer from './components/tabbar/ShopCarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import NewList from './components/home/newlist.vue'
import NewsInfo from './components/home/newsInfo.vue'
import PhotoShare from './components/homephotos/photosshare.vue'
import PhotoInfo from './components/homephotos/photoinfo.vue'
import BuyGoods from './components/home/buyugoods.vue'
import GoodsInfo from './components/home/goodsinfo.vue'
import GoodsMore from './components/home/goodsmore.vue'
import GoodsMoment from './components/home/goodsmoment.vue'
   
var router = new VueRouter({
  routes: [
    { path: '/', redirect: '/home' },
    { path: '/home', component: HomeContainer },
    { path: '/member', component: MemberContainer },
    { path: '/shopcar', component: ShopCarContainer },
    { path: '/search', component: SearchContainer },
    { path: '/home/newlist', component: NewList },
    { path: '/home/newsInfo/:id', component: NewsInfo },
    { path: '/home/photoShare', component: PhotoShare },
    { path: '/home/photoInfo/:id', component: PhotoInfo },
    { path: '/home/buygoods', component: BuyGoods  },
    { path: '/home/goodsInfo/:id', component: GoodsInfo, name: 'goodsInfo' },
    { path: '/home/goodsMore/:id', component: GoodsMore, name: 'goodsmore' },
    { path: '/home/goodsMoment/:id', component: GoodsMoment, name: 'goodsmoment' }
  ],
  linkActiveClass: 'mui-active'
})

export default router;